package com.sh.personnel.security.config.handler;

import org.springframework.security.core.Authentication;
import org.springframework.security.web.authentication.logout.LogoutSuccessHandler;
import org.springframework.stereotype.Component;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * 退出登录返回的信息
 * @author 林思浩
 * @date 2020/01/05 19:19
 */
@Component
public class MyLogoutSuccessHandler extends MyCustomHandler implements LogoutSuccessHandler {

    @Override
    public void onLogoutSuccess(HttpServletRequest request, HttpServletResponse response, Authentication authentication) throws IOException {
        this.responseJson(HttpServletResponse.SC_OK, "退出登录", response);
    }

}
